<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>Document</title>
	</head>
	<body>
		<script>
			function Star(uname, age) {
				this.uname = name;
				this.age = age;
			}

			let that;

			Star.prototype.sing = function () {
				console.log('sing');
				that = this;
			};

			let vae = new Star('vae', 35);
			// 在构造函数里，this 指向的是对象实例 vae
			vae.sing();

			console.log(that === vae);
			// 原型对象里面的 this 指向的是实例对象 vae
		</script>
	</body>
</html>
